import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] playGame = new int[2 * n];
        int[] computerGame = new int[2 * n];
        for (int i = 0; i < 2 * n; i++) {
            playGame[i] = sc.nextInt();
        }
        for (int i = 0; i < 2 * n; i++) {
            computerGame[i] = sc.nextInt();
        }
        Arrays.sort(playGame);
        Arrays.sort(computerGame);

        int score = 0;
        int playPtr = 0, computerPtr = 0;

        // 前n对：比较玩家前n张牌和电脑前n张牌
        for (int i = 0; i < n; ) {
            if (playGame[playPtr] < computerGame[computerPtr]) {
                score++;
                playPtr++;
                computerPtr++;
                i++; // 只有成功比较时才递增i
            } else {
                computerPtr++; // 比较失败时只移动电脑指针
            }
        }

        // 后n对：比较玩家后n张牌和电脑后n张牌
        while (playPtr < 2 * n && computerPtr < 2 * n) {
            if (playGame[playPtr] > computerGame[computerPtr]) {
                score++;
                playPtr++;
                computerPtr++;
            } else {
                playPtr++; // 比较失败时只移动玩家指针
            }
        }

        System.out.println(score);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] playGame = new int[2 * n];
        int[] computerGame = new int[2 * n];
        for (int i = 0; i < 2 * n; i++) {
            playGame[i] = sc.nextInt();
        }
        for (int i = 0; i < 2 * n; i++) {
            computerGame[i] = sc.nextInt();
        }
        Arrays.sort(playGame);
        Arrays.sort(computerGame);

        int score = 0;

        // 前n对：playGame的最小n张 equals computerGame的最大n张
        int playLeft = 0;
        int computerRight = n;
        for (int i = 0; i < n; i++) {
            if (playGame[playLeft] < computerGame[computerRight]) {
                score++;
                playLeft++;
                computerRight++;
            } else {
                computerRight++;
            }
        }

        // 后n对：playGame的最大n张 vs computerGame的最小n张
        int playRight = 2 * n - 1;
        int computerLeft = 0;
        for (int i = 0; i < n; i++) {
            if (playGame[playRight] > computerGame[computerLeft]) {
                score++;
                playRight--;
                computerLeft++;
            } else {
                playRight--;
            }
        }

        System.out.println(score);
    }
}